package com.login.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.login.model.LoginDo;


/**
 * 测试接口
 * @author guwei
 *
 */
@Controller
@RequestMapping("/http")
public class HttpController {
	@RequestMapping(value="/http",produces = "text/html;charset=UTF-8")
	@ResponseBody
	public String  http(HttpSession session,ModelMap model,HttpServletRequest request ){
		 LoginDo l =  (LoginDo)request.getSession().getAttribute("user");   
		JSONObject json=new JSONObject();
		  String c = json.toJSONString(l);
		return c;
		
	}
}
